﻿@model IEnumerable<Cofe.Web.Models.VolumeInfoViewModel>
@{
    ViewBag.Title = "Index";
}

<h2>Volumes</h2>
You can find a list of registered volumes here:
<table>            
    <thead>
        <tr>
            <td>Factory id</td>
            <td>Volume id</td>
            <td>Parameters</td>
            <td>Me</td>
            <td>Family Members</td>
            <td>Friends</td>
            <td>Others</td>
        </tr>
    </thead>
    @foreach (var v in Model)
    {    
        <tr>
            <td>@Html.DisplayFor(m => v.VolumeInfo.FactoryId)</td>
            <td>@Html.DisplayFor(m => v.VolumeInfo.VolumeId)</td>
            <td>@Html.DisplayFor(m => v.VolumeInfo.ParamString)</td>
            <td>@Html.DisplayFor(m => v.MePermission)</td>
            <td>@Html.DisplayFor(m => v.FamilyMemberPermission)</td>
            <td>@Html.DisplayFor(m => v.FriendPermission)</td>
            <td>@Html.DisplayFor(m => v.PublicPermission)</td>        
            <td>@Html.ActionLink("Remove", "Delete", new { volumeId = v.VolumeInfo.VolumeId }) </td>    
            @*<td>@Ajax.ActionLink("Remove", "Delete", new AjaxOptions() { 
               UpdateTargetId = "dialog-conforim", InsertionMode = InsertionMode.Replace, HttpMethod="GET" })</td>*@
        </tr>
    }
</table>
<div>
    @Html.ActionLink("Create new volume", "Create")
</div>
